import React from 'react';
import { BrowserRouter as Router, Link, Route } from 'react-router-dom'
import Index from './Pages/Index'
import Video from './Pages/Video'
import Workplace from './Pages/Workplace'
// 引入样式
import './index.css'

function SecondaryRouter() {
  return (
    <Router>
      <div className="wrap">
        <div className="leftNav">
          <h2>一级路由</h2>
          <ul>
            <li>
              <Link to="/">博客首页</Link>
            </li>
            <li>
              <Link to="/video/">视频教程</Link>
            </li>
            <li>
              <Link to="/workPlace/">职场技能</Link>
            </li>
          </ul>
        </div>
        <div className="rightNav">
          <Route path="/" component={Index} />
          <Route path="/video/" component={Video} />
          <Route path="/workPlace/" component={Workplace} />
        </div>
      </div>
    </Router >
  )
}

export default SecondaryRouter